package com.dyy.proxy;

import com.dyy.proxy.service.AdminService;

/**
 * @author dingyy@jccfc.com
 * @since 2021/12/12 21:50
 */
public class AdminServiceProxy implements AdminService {

    private final AdminService adminService;

    public AdminServiceProxy(AdminService service) {
        this.adminService = service;
    }

    @Override
    public void update() {
        System.out.println("判断客户是否有权限操作数据变更");
        adminService.update();
        System.out.println("记录客户的操作变更");
    }

    @Override
    public Object find() {
        System.out.println("判断客户是否有权限find");
        Object obj = adminService.find();
        System.out.println("记录客户的LOG日志 ");
        return obj;
    }
}
